home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
k
/
kids7.dms
/
kids7.adf
/
title.amos
/
title.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1992-10-04
|
13KB
|
377 lines
Global NAME$,SELECT,CHANGE$,WLT$
'
BIGGIES
'
Procedure BIGGIES
Colour Back $BBB : Load "KIDS-7:bits/tsam.abk",5 : Sam Loop On : Sam Play 15,1,8500 : Get Fonts
S=Screen : Volume 63 : If S=0 Then Screen Close 0
Unpack 10 To 0 : Screen Display 0,120,34,, : Bob 1,234,111,1 : Reserve Zone 3
Set Zone 1,237,70 To 312,103 : Set Zone 2,237,114 To 312,145 : Set Zone 3,237,156 To 312,188
Shift Up 10,16,19,1 : X Mouse=274 : Y Mouse=74 : WLT$=""
PH1$=" Pretty helpful eh?" : PH2$="I hate it when that happens!"
Screen Open 1,320,50,32,Lowres : Get Palette 0 : Screen To Back : Curs Off : Flash Off : Cls 21 : Set Font 3 : Ink 10,21 : Screen Hide 1
Do
If N=16 or N=0 Then Restore
Add N,1,1 To 16
CHECK : CH=Param
If CH=99 : TX$=PH1$ : N=0 : Goto HERE : End If
If CH=98 : TX$=PH2$ : N=0 : Goto HERE : End If
Read TX$ : Wait 5
HERE:
Screen 1 : Cls 21 : Ink 22,21 : Text 15,15,TX$
For T=2 To 22
Screen Copy 1,4,T-1,300,T To 0,10,T+10 : Wait 4 : CHECK : CH=Param
If CH=99 : TX$=PH1$ : N=0 : Goto HERE : End If
If CH=98 : TX$=PH2$ : N=0 : Goto HERE : End If
Next T
Wait 5 : Screen 1 : Cls 21
I=Rnd(13)+2 : Ink I,21 : Text 15,15,TX$
For T=2 To 22
Screen Copy 1,4,T-1,300,T To 0,10,T+10 : Wait 4 : CHECK : CH=Param
If CH=99 : TX$=PH1$ : N=0 : Goto HERE : End If
If CH=98 : TX$=PH2$ : N=0 : Goto HERE : End If
Next T
Screen 1 : Cls 21 : Ink 21,21 : Text 15,15,TX$
For T=22 To 2 Step -1
Screen Copy 1,4,T-1,300,T To 0,10,T+10 : Wait 1 : CHECK : CH=Param
If CH=99 : TX$=PH1$ : N=0 : Goto HERE : End If
If CH=98 : TX$=PH2$ : N=0 : Goto HERE : End If
Next T
Loop
Data " Copyright � 1995 "
Data " Duncan Moran "
Data " Make a copy & give it away "
Data " Created with AMOS "
Data " Press the keyboard's HELP..."
Data " ...key for the instructions "
Data " or go and click on something! "
Data " Didn't win the lottery again? "
Data " Here's a money saving tip..."
Data " tell all your friends... "
Data " don't buy Licenceware."
Data " Save a fortune!"
Data " Real programmers do it..."
Data " ... in public! "
Data " This is all there is! "
Data " There is nothing else! "
End Proc
Procedure CHECK
Screen 0 : CH=0
A$=Inkey$ : S=Scancode : MZ=Mouse Zone : MK=Mouse Key
If S=95 Then WRITE
If MZ=3 and MK>0 Then ADV
If MZ=2 and MK>0
Screen 0 : Cls 21,0,0 To 330,35
If Rnd(6)<>3
Wait Vbl : Screen Hide 0 : Wait Vbl : CH=99
HELP
Else
CH=98
PLEH
End If
End If
If MZ=1 and MK>0 Then EMPLOY
End Proc[CH]
Procedure HELP
Screen Open 2,360,260,32,Lowres : Screen Display 2,120,30,, : Screen To Back : Curs Off : Flash Off
Get Palette 0 : Cls 21 : Wait Vbl : Screen To Front 2 : Set Font 3
Ink 23,21
Text 48,102,"Click START to start"
Text 48,152,"Click STOP to stop"
Gr Writing 8 : I=11 : Paste Bob 200,200,5 : Limit Mouse 315,233 To 389,259
Draw 101,107 To 168,107 : Draw 101,157 To 153,157
Repeat
Ink I,21 : I=Rnd(19)+1
Text 50,100,"Click START to start"
Ink I,21 : I=Rnd(19)+1
Text 50,150,"Click STOP to stop"
Ink I,21 : I=Rnd(19)+1 : Text 104,100,"START" : Ink I,21 : I=Rnd(19)+1 : Text 104,150,"STOP"
I=Rnd(19)+1 : Ink I,21 : Draw 103,105 To 170,105 : I=Rnd(19)+1 : Ink I,21 : Draw 103,155 To 155,155
T=Timer : MK=Mouse Key
Repeat
MK=Mouse Key
Exit If MK>0,2
Until Timer=>T+15
Until MK>0
If MK=2 Then EDDY
Gr Writing 1 : Screen Close 2 : Screen Show 0 : Limit Mouse : X Mouse=274 : Y Mouse=74
End Proc
Procedure EMPLOY
Screen Close 1 : Hide
Screen 0 : Reserve Zone : Cls 21 : Set Font 3 : Ink 11,21 : Text 50,100,"What is your name?"
AM$="A 0,(2,35)(3,10)(4,10)(3,10)"
Bob 1,130,120,2 : Wait Vbl : Channel 1 To Bob 1 : Amal 1,AM$ : Amal On 1
A$="" : NAME$="" : Ink 4,21
Do
Repeat
Clear Key : AC=0 : AD=0 : A$=""
Repeat
A$=Inkey$
If Len(NAME$)>15 Then A$=Chr$(8)
A$=Lower$(A$) : AC=Asc(A$) : AD=Scancode
Until A$<>""
Until AC=13 or AC=8 or AD=70 or(AC>96 and AC<123)
If AC<>8 or AD<>70
If Len(NAME$)=0 : A$=Upper$(A$) : Amal Off 1 : Bob Off 1 : Wait Vbl : End If
If A$<>Chr$(13) : NAME$=NAME$+A$ : End If
W=Text Length(NAME$) : Text(305-W)/2,125,NAME$
End If
If AC=13 : Cls 21 : Exit : End If
If AC=8 or AD=70
Text 10,125,Space$(150) : NAME$="" : Bob 1,130,120,2 : Amal 1,AM$ : Amal On 1
End If
Loop
Show : SMELL
End Proc
Procedure PLEH
Bob 1,100,111,1 : Wait 2 : Bob 1,50,111,1 : Wait 2 : Bob 1,23,111,1
T=Timer : Repeat : Until Timer>=T+25
X Mouse=274 : Y Mouse=74
Bob 1,234,111,1 : T=Timer : Repeat : Until Timer>=T+10
End Proc
Procedure SELL
Screen 0 : Reserve Zone 3 : Cls 21 : Y=80 : Text 18,50,"Which type of helper are you?"
Set Zone 1,100,80 To 255,116
Set Zone 2,100,131 To 255,166
Set Zone 3,100,170 To 255,206 : X Mouse=370 : Y Mouse=140
For N=1 To 3
Paste Bob 100,Y,N+7
Add Y,50
Next N
Repeat
MZ=Mouse Zone : MK=Mouse Key
Until MZ>0 and MK>0
Reserve Zone
LEVEL=MZ : SCORE=100 : A$=NAME$+"|"+Str$(LEVEL)+""+"/XXX\"+Str$(SCORE) : Command Line$=A$
Sam Loop Off : Cls 21 : Amal Off : Bob Off : Wait 150
Text 50,100,"Get packing..." : Volume 63
Run "kids-7:pack.amos"
End Proc
Procedure SMELL
Screen 0 : Double Buffer : Cls 21 : Y=100 : Ink 11,21 : Text 25,50," Will you help my little"
Text 25,70," chum on holiday?" : X Mouse=370 : Y Mouse=140
Reserve Zone 2 : Set Zone 1,130,100 To 193,136 : Set Zone 2,130,140 To 192,176
A1$="A 0,(11,12)(12,12)" : A1$=A1$+"L: M 0,-40,20; P; M 0,40,10; P; J L" : A4$="A 0,(16,12)(17,12)(18,12)" : Channel 2 To Bob 2
A2$="A 0,(13,4)(14,4)(15,4)" : A3$="A 0,(11,20)(12,20)" : Bob 1,50,150,11 : Wait Vbl
For N=1 To 2
Paste Bob 130,Y,N+5
Add Y,40
Next N
Repeat
MZ=Mouse Zone : MK=Mouse Key
If MZ=0 and T$<>A3$ Then Bob 1,50,150,11 : Wait 3 : T$=A3$ : Amal 1,A3$ : Amal On 1 : If CRY Then Amal Off 2 : Bob Off 2 : CRY=False : Wait Vbl
If MZ=1 and T$<>A1$ Then Bob 1,50,150,11 : Wait 3 : T$=A1$ : Amal 1,A1$ : Amal On 1 : If CRY Then Amal Off 2 : Bob Off 2 : CRY=False : Wait Vbl
If MZ=2 and T$<>A2$
Bob 1,50,150,13 : T$=A2$ : Amal 1,A2$ : Amal On 1 : Wait 3
Bob 2,42,175,16 : Wait 3
Amal 2,A4$ : Amal On 2 : CRY=True
End If
Until MZ>0 and MK>0
Reserve Zone
If MZ=2
Sam Loop Off
Screen Close 0 : Amal Off : Bob Off : Wait 100
BIGGIES
Else
SELL
End If
End Proc
Procedure ADV
Screen 0 : Cls 21 : Pen 3 : Paper 21 : Ink 14,21 : Flash 3,"(f00,25)(bbb,25)"
' MAX "be exclusive discs for subscribers only."
Home : Print : Print : Print : Print
Box 20,20 To 330,250 : Ink 13, : Box 19,19 To 331,251 : Ink 14, : Box 18,18 To 332,252
Centre "WARNING" : Print : Print : Pen 11
Centre "KIDS DISK discs" : Print : Print
Centre "The subscribers mailing list now" : Print
Centre "stretches all the way to Australia." : Print : Print
Centre "In the future there may be exclusive " : Print
Centre "discs for subscribers only." : Print : Print
Centre "If you would like to join the" : Print
Centre "children, parents and schools already" : Print
Centre "on the list and receive the next" : Print
Centre "five discs please send �4" : Print : Print : Print
Centre " to... Duncan Moran" : Print
Centre " 24 First Avenue" : Print
Centre " Colwyn Bay" : Print
Centre " Clwyd" : Print
Centre " LL28 4DQ" : Print : Print : Print
Centre "In return I will send you more" : Print
Centre "Kids Disk discs as they are finished" : Print : Print : Pen 3
Centre "Click to continue"
Repeat : MK=Mouse Key : Until MK>0
End
End Proc
Procedure EDDY
Dim WRDS$(20) : Gosub CLIT
Hide : Cls 21 : Ink 14,21 : Box 20,20 To 330,250 : Ink 13, : Box 19,19 To 331,251 : Ink 14, : Box 18,18 To 332,252
For N=40 To 249 Step 16
Draw 21,N To 329,N : Ink 14,
Draw 21,N+1 To 329,N+1 : Ink 13,
Next N
Set Font 0 : Ink 3, : Gr Writing 1
Do
TMP=1
Text 22,52,"1: Edit the word list - Beach "
Text 22,68,"2: Edit the quiz list - Forest "
Text 22,84,"3: None of the above - Quit editor"
GREY : CHS=SELECT : If CHS=3 Then Show : Pop Proc
TMP=0
On CHS Gosub BEACH,FUREST
WIPE
Loop
BEACH:
WIPE
Text 22,52,"1: Level one words - Beginners "
Text 22,68,"2: Level two words - Middling "
Text 22,84,"3: Level three words - Advanced "
GREY : CHS=SELECT
If CHS=1 Then WLT$="words1.dat"
If CHS=2 Then WLT$="words2.dat"
If CHS=3 Then WLT$="words3.dat"
WIPE : Text 22,68," LOADING WORD LIST"
Open In 1,"KIDS-7:bits/"+WLT$
For N=1 To 20 : Input #1,A$ : WRDS$(N)=A$ : Next N
Close 1 : M=1 : T$="bch"
WIPE : Gosub REDDY
Do
GREY
Exit If SELECT=99
If SELECT<>33
Gosub CHANGE
Else
If M=1 : M=11 Else M=1 : End If
WIPE
Gosub REDDY
End If
Loop
Gosub GROUT
Return
'
'
'
FUREST:
Gosub CLIT : WIPE
Text 22,52," Sorry. My Amiga died before I"
Text 22,68," managed to finish this. Use a"
Text 22,84," word processor or text editor to"
Text 22,100," edit the questions which are in"
Text 22,116," KIDS-7:BITS/quizN.dat"
Text 22,132," Enter 99 to return to menu"
' GREY : CHS=SELECT : T$="fur"
If CHS=1 Then WLT$="quiz1.dat"
If CHS=2 Then WLT$="quiz2.dat"
If CHS=3 Then WLT$="quiz3.dat"
' WIPE : Text 22,68," LOADING QUIZ LIST"
' Open In 1,"KIDS-7:bits/"+WLT$
' For N=1 To 10 : Input #1,A$,B$,C$,D$ : WRDS$(N)=A$ : Next N
' Close 1 : M=1
' WIPE : Gosub REDDY
Do
GREY
Exit If SELECT=99
Gosub QCHANGE
Loop
Gosub GROUT
Return
'
'
'
CHANGE:
XCH$=WRDS$(SELECT) : Text 22,36," "
Text 22,36,"Enter your word: "
NT=SELECT : If NT>10 Then NT=NT-10
Text 22,((NT-1)*16)+52," > ? < "
GRAY
If Len(CHANGE$)<8
WRDS$(SELECT)=CHANGE$ : WRDS$(0)="C"
Else
WIPE
Text 22,68," Not Done - Word too long!"
WRDS$(SELECT)=XCH$ : Wait 50
End If
WIPE : Gosub REDDY
Return
'
'
QCHANGE:
XCH$=WRDS$(SELECT) : Text 22,36," "
Text 22,36,"Enter new question: "
NT=SELECT : Text 22,((NT-1)*16)+52," > ? < "
GRAY
If Len(CHANGE$)<32
WRDS$(SELECT)=CHANGE$ : WRDS$(0)="C"
Else
WIPE
Text 22,68," Not Done - Question too long!"
WRDS$(SELECT)=XCH$ : Wait 50
End If
WIPE : Gosub REDDY
Return
REDDY:
TT=M
If M=11 : SH$=" 33: Show items 1 - 10 " : End If
If M=1 : SH$=" 33: Show items 11 - 20 " : End If
For N=52 To 200 Step 16
T$=Str$(M)+": "+WRDS$(M) : If M<10 : T$=" "+T$ : End If
Text 22,N,T$
Inc M
Next N
Text 32,228,SH$
If TMP=0 Then Text 32,244," 99: SAVE and return to menu"
M=TT
Return
GROUT:
WIPE
If WRDS$(0)="C"
Text 22,68," SAVING NEW LIST"
Open Out 1,"KIDS-7:bits/"+WLT$
For N=1 To 20 : Print #1,WRDS$(N) : Next N
Close 1
Else
Text 22,68," NO CHANGES MADE! "
Wait 25
End If
WRDS$(0)=" "
Return
CLIT:
For N=0 To 20 : WRDS$(N)=" " : Next N
Return
End Proc
Procedure GREY
Text 22,36,"Type number & press RETURN: "
Clear Key : Ink 11, : Text 250,36," "
Repeat
Repeat
A$=Inkey$ : AA=Asc(A$)
If A$=Chr$(8) Then T$="" : A$="" : Text 250,36," "
Until A$=Chr$(13) or(AA>47 and AA<58)
If A$<>Chr$(13)
T$=T$+A$ : Text 250,36,T$
End If
Until A$=Chr$(13)
SELECT=Val(T$) : Ink 3,
End Proc
Procedure WIPE
For N=52 To 200 Step 16
Text 22,N," "
Next N
Text 22,228," "
Text 32,244," "
End Proc
Procedure GRAY
Clear Key : Ink 11, : Text 160,36," "
Repeat
Repeat
A$=Inkey$ : AA=Asc(A$)
If A$=Chr$(8) Then T$="" : A$="" : Text 160,36," "
Until A$=Chr$(13) or(AA>96 and AA<123)
If A$<>Chr$(13)
T$=T$+A$ : Text 160,36,T$
End If
Until A$=Chr$(13)
CHANGE$=T$ : Ink 3,
End Proc
Procedure WRITE
Read Text "KIDS-7:bits/help.text"
End Proc